﻿
    using Chain.BLL;
//    using ChainStock.Controls;
    using System;
    using System.Data;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class MemInfo : PageBase
    {
        private OrderDetail bllOrderDetail = new OrderDetail();
        private OrderLog bllOrderLog = new OrderLog();


        protected string GetGoodsType(int intGoodsType, float strNumber)
        {
            switch (intGoodsType)
            {
                case 0:
                    return "普通商品";

                case 1:
                    return "服务项目";
            }
            return "";
        }

        protected string GetOrderType(int intOrderType)
        {
            switch (intOrderType)
            {
                case 0:
                    return "快速消费";

                case 1:
                    return "计时消费";

                case 2:
                    return "商品消费";
            }
            return "";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                if (base.Request.QueryString["MemCard"] != null)
                {
                    this.MemCard.Value = base.Request.QueryString["MemCard"];
                }
                this.chkIsPast.Checked = PubFunction.curParameter.bolPastTime;
                PubFunction.BindMemInfoCustomFields(this.MemInfoCustomField, "Mem", "MemInfo_Custom_");
                this.SetQuickBtn();
                this.ucMemberSearch.BolSenseICCard = base.curParameter.bolSenseiccard;
                this.ucMemberSearch.BolContactICCard = base.curParameter.bolContacticcard;
            }
        }

        private void SetQuickBtn()
        {
            DataTable dt = PubFunction.GetGroupAuthority(base._UserGroupID);
            this.btnEditMem.Visible = PubFunction.GetControlVisit(dt, int.Parse(this.btnEditMem.Attributes["cls"]), 3);
            this.btnExpense.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btnExpense.Attributes["cls"]));
            this.btGoodsExpense.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btGoodsExpense.Attributes["cls"]));
            this.btTimeExpense.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btTimeExpense.Attributes["cls"]));
            this.btConsumeMemCount.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btConsumeMemCount.Attributes["cls"]));
            this.btnRechargeMoney.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btnRechargeMoney.Attributes["cls"]));
            this.btnRechargCount.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btnRechargCount.Attributes["cls"]));
            this.btnExchangeGift.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btnExchangeGift.Attributes["cls"]));
            this.btnSendSMS.Visible = PubFunction.GetPageVisit(dt, int.Parse(this.btnSendSMS.Attributes["cls"]));
            this.btnSendSMS.Visible = PubFunction.curParameter.bolSms;
        }
    }


